<?php

/**
 * InvoiceAttachmentDr form base class.
 *
 * @method InvoiceAttachmentDr getObject() Returns the current form's model object
 *
 * @package    erpcrm
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
 */
abstract class BaseInvoiceAttachmentDrForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'invoice_iden'    => new sfWidgetFormInputHidden(),
      'attachment_iden' => new sfWidgetFormInputHidden(),
      'dr_number'       => new sfWidgetFormInputText(),
      'dr_date'         => new sfWidgetFormDate(),
      'received_by'     => new sfWidgetFormInputText(),
      'date_received'   => new sfWidgetFormDate(),
    ));

    $this->setValidators(array(
      'invoice_iden'    => new sfValidatorPropelChoice(array('model' => 'Invoice', 'column' => 'invoice_iden', 'required' => false)),
      'attachment_iden' => new sfValidatorPropelChoice(array('model' => 'InvoiceAttachmentDr', 'column' => 'attachment_iden', 'required' => false)),
      'dr_number'       => new sfValidatorString(array('max_length' => 15)),
      'dr_date'         => new sfValidatorDate(),
      'received_by'     => new sfValidatorString(array('max_length' => 50)),
      'date_received'   => new sfValidatorDate(),
    ));

    $this->widgetSchema->setNameFormat('invoice_attachment_dr[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'InvoiceAttachmentDr';
  }


}
